import { history } from 'ice';

import { useEffect } from 'react';


export default function Dashboard() {
  useEffect(() => {
    const token = sessionStorage.getItem('token') || ''
    if (token) { history?.push('/patients') }
    else {
      history?.push({
        pathname: '/login',
      })
      console.log('index page')
    }

  }, [])
}
